package com.lovo.controller;


import com.lovo.bean.SysUser;
import com.lovo.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * ?û?? 前端控制器
 * </p>
 *
 * @author lovo
 * @since 2022-09-17
 */
@RestController
@RequestMapping("qd/user")
public class SysUserController {

    @Autowired
    ISysUserService userService;

    @GetMapping("login/{name}/{pwd}")
    public SysUser login(@PathVariable("name") String name, @PathVariable("pwd") String pwd) {
        return userService.login(name, pwd);
    }

    @GetMapping("findUserById/{id}")
    public SysUser findUserById(@PathVariable("id")Integer id){
        return userService.findUserById(id);
    }

}
